package com.cloudeasy.search.po;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;

/**
 * 帖子搜索实体类
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Accessors(chain = true)
@Document(indexName = "post")
public class Post {
    /**
     * Id
     */
    @Id
    private String id;
    /**
     * 标题
     */
    @Field(analyzer = "ik_max_word", searchAnalyzer = "ik_max_word")
    private String title;
    /**
     * 内容
     */
    @Field(analyzer = "ik_max_word", searchAnalyzer = "ik_max_word")
    private String content;
    /**
     * 类型
     */
    private String type;
}
